$(window).scroll(function () {
    var before = $(window).scrollTop();
    $(window).scroll(function () {
        var after = $(window).scrollTop();
        if (before < after) {
            console.log('上');
            $(".header-content[state='0']").animate({
                top: '-52px'
            }, 100)
            $(".header-content[state='0']").attr("state", "1");
            before = after;
        }
        ;
        if (before > after) {
            console.log('下');
            $(".header-content[state='1']").animate({
                top: '0px'
            }, 100)
            $(".header-content[state='1']").attr("state", "0");
            before = after;
        }
        ;
    });
});

$(function () {
    $(".form-control").keydown(function (event) {
        // alert("test");
        var index = $(".form-control").index(this);
        var question;
        if (event.keyCode == 13) {
            $(".form-control").eq(index).submit();
            // url = "queryQuestion?question=" + question;
            // alert(url);
            // window.location.href = url;
            // //alert(index);
            //alert(question)
            // index.submit();
        }
    })
})